Skip to content

refactor: rename package to @mcpdotdirect/template-mcp-server and upd… - #1

Merged
ccbbccbb merged 3 commits into
mainfrom
release-tag
Mar 13, 2025
Merged

refactor: rename package to @mcpdotdirect/template-mcp-server and upd…#1
ccbbccbb merged 3 commits into
mainfrom
release-tag

Conversation

@ccbbccbb

@ccbbccbb ccbbccbb commented Mar 13, 2025

Copy link
Copy Markdown
Member

…ate README for user quickstart

Summary by CodeRabbit

  • New Features

    • Introduced a command-line tool that scaffolds a new MCP server project for streamlined setup.
  • Documentation

    • Updated the project overview with a revised name, concise description, and refined usage instructions.
  • Chores

    • Enhanced package metadata and build configurations to support broader distribution and maintainability.

@ccbbccbb
ccbbccbb requested a review from wayzeek March 13, 2025 22:07
@coderabbitai

coderabbitai Bot commented Mar 13, 2025

Copy link
Copy Markdown

Walkthrough

This pull request updates project metadata and introduces a new script. The README now reflects the new project name and a revised description, along with a minor rephrasing of the usage instructions. A new Node.js script (create-mcp-server.js) has been added to automate the creation of a new MCP server project, including checks for an empty working directory and copying of template files. Additionally, the package.json file has been significantly updated with the new scoped package name, public settings, entry points, repository details, and other metadata.

Changes

File(s) Change Summary
README.md Updated project name from @mcpdotdirect/create-mcp-server to @mcpdotdirect/template-mcp-server, rephrased description and usage comment while keeping overall structure intact.
bin/create-mcp-server.js Added a new Node.js script to initialize a new MCP server project. Implements checks for non-empty directories, validates source availability, copies necessary files (skipping extraneous ones), generates a package.json, and provides user guidance for next steps and error handling.
package.json Revised package metadata: updated package name, description, and privacy settings; added new main and bin fields; introduced a files array, a prepublish script, repository and publish configuration, keywords, author, license, bugs URL, homepage, and Node.js engine requirements.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Script
    participant FileSystem

    User->>Script: Execute "create-mcp-server" command
    Script->>FileSystem: Check if current directory is empty
    alt Directory not empty
        FileSystem-->>Script: Return directory contents
        Script->>User: Prompt to create a new directory
    else Directory empty
        Script->>FileSystem: Validate source directory exists
        FileSystem-->>Script: Confirm existence or error if missing
        Script->>FileSystem: Copy relevant files (skipping node_modules, etc.)
        FileSystem-->>Script: Files copied
        Script->>User: Generate package.json and display next steps
    end
Loading

Poem

Hey there, I'm a hopping bunny,
Delight in changes oh-so sunny,
New script and tweaks, a joyful spree,
Building servers as quick as can be,
In a code garden we frolic with glee 🐇
Cheers to updates, fresh and free!

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
bin/create-mcp-server.js (1)

145-186: Consider allowing customization of the generated project.

The function creates a fixed package.json with hardcoded values. Consider enhancing user experience by allowing some customization.

You could:

  1. Allow specifying a custom project name
  2. Optionally include repository details
  3. Let users select which dependencies to include

Example implementation:

-function createProjectPackageJson() {
+function createProjectPackageJson(options = {}) {
   const packageJsonPath = path.join(targetDir, 'package.json');
+  const projectName = options.projectName || path.basename(targetDir);
   
   const projectPackageJson = {
-    name: "mcp-server",
+    name: projectName,
     module: "src/index.ts",
     type: "module",
     version: "1.0.0",
     description: "Model Context Protocol (MCP) Server",
     private: true,
     // rest of the configuration...
   };
   
   // Write the file...
 }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 830655c and 8e1191e.

📒 Files selected for processing (3)
  • README.md (1 hunks)
  • bin/create-mcp-server.js (1 hunks)
  • package.json (2 hunks)
🔇 Additional comments (5)
README.md (1)

1-1: The project name and description have been updated successfully.

The package renaming from @mcpdotdirect/create-mcp-server to @mcpdotdirect/template-mcp-server and the more concise description are good improvements that clarify the purpose of this package.

Also applies to: 7-7

package.json (4)

2-11: Good package configuration for CLI tool.

The package is properly configured with:

  • Correct scoped name
  • Public access
  • Main entry point
  • Bin configuration for the CLI tool
  • Appropriate files array

This setup will ensure the package works correctly when published and installed.


27-29: Appropriate build script for publishing.

Adding the prepublishOnly script ensures the package is built before publishing, which is a good practice.


30-54: Complete metadata for package visibility.

The repository, keywords, author, license, bugs, and homepage fields are well configured, which improves discoverability and provides important information for users.


70-72: Good practice: Node.js version requirement.

Specifying the minimum Node.js version required ensures users have a compatible environment to run your package.

Comment thread bin/create-mcp-server.js
@mcpdotdirect mcpdotdirect deleted a comment from coderabbitai Bot Mar 13, 2025
@ccbbccbb
ccbbccbb merged commit 573f66e into main Mar 13, 2025
@ccbbccbb
ccbbccbb deleted the release-tag branch March 13, 2025 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant